package com.warmheart.core.rs.base;

import com.warmheart.core.cors.builder.CoRsBuilder;
import com.warmheart.core.rs.builder.RsBuilder;
import com.warmheart.core.rs.oper.Rs;

/**
 * 
 * @ClassName: BaseRsBuilder
 * @Description: 自定义返回值基础实现类
 * @author ZhangJianyang
 * @date 2025-06-16 09:37:02
 *
 * @param <T>
 */
public abstract class BaseRsBuilder<T extends CoRsBuilder<?, ?>, R extends RsBuilder<T>> implements RsBuilder<T> {

    protected abstract R self();

    private Rs<T, R> id;

    private Rs<T, R> createDate;

    private Rs<T, R> createBy;

    private Rs<T, R> updateDate;

    private Rs<T, R> updateBy;

    private Rs<T, R> remarks;

    private Rs<T, R> delFlag;

    public Rs<T, R> id() {
        if (this.id == null) {
            this.id = new Rs<T, R>(self(), "id", "id");
        }
        return this.id;
    }

    public Rs<T, R> createDate() {
        if (this.createDate == null) {
            this.createDate = new Rs<T, R>(self(), "create_date", "createDate");
        }
        return this.createDate;
    }

    public Rs<T, R> createBy() {
        if (this.createBy == null) {
            this.createBy = new Rs<T, R>(self(), "create_by", "createBy");
        }
        return this.createBy;
    }

    public Rs<T, R> updateDate() {
        if (this.updateDate == null) {
            this.updateDate = new Rs<T, R>(self(), "update_date", "updateDate");
        }
        return this.updateDate;
    }

    public Rs<T, R> updateBy() {
        if (this.updateBy == null) {
            this.updateBy = new Rs<T, R>(self(), "update_by", "updateBy");
        }
        return this.updateBy;
    }

    public Rs<T, R> remarks() {
        if (this.remarks == null) {
            this.remarks = new Rs<T, R>(self(), "remarks", "remarks");
        }
        return this.remarks;
    }

    public Rs<T, R> delFlag() {
        if (this.delFlag == null) {
            this.delFlag = new Rs<T, R>(self(), "del_flag", "delFlag");
        }
        return this.delFlag;
    }
}
